<!DOCTYPE html>
<html layout:decorator="fragments/layout">
<head>
    <title>资料填写</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link href="../../../../resources/css/bootstrap-datetimepicker.min.css" rel="stylesheet"  media="screen" th:href="@{/resources/css/bootstrap-datetimepicker.min.css}"/>
</head>
<body>

<div layout:fragment="content">

<div class="container">
<form action="#" th:action="@{${action}}" th:object="${appointment}" onsubmit="return CheckForm(this)" class="well" method="post">
  <input type="hidden" th:field="*{id}" id="id" th:if="${not #lists.isEmpty(appointment.id)}"></input>   

  <div class="form-group">
    <label for="name" th:text="#{menu.appointment.c1}">name</label>
    <input type="text" th:field="*{name}" class="form-control" id="name" data_check="needInput()"></input>
    <span th:if="${#fields.hasErrors('name')}" th:errors="*{name}">Name Error</span>
  </div>
  
   <div class="form-group">
    <label for="telphone" th:text="#{menu.appointment.c5}">telphone</label>
    <input type="text" class="form-control"  th:field="*{telphone}" id="telphone"  data_check="isMobile()"></input>
    <span th:if="${#fields.hasErrors('telphone')}" th:errors="*{telphone}">telphone Error</span>
  </div>
  
  <div class="form-group">
    <label for="businessType" th:text="#{menu.appointment.c2}">bussiness type</label>        
    <select name="businessType" th:field="*{businessType}" class="form-control" data_check="needInput()">
      <option th:each="status : ${allBusinessType}" 
          th:value="${status}" 
          th:text="${status}">status</option>
	</select>
  </div>
  
  
   <div class="form-group">
    <label for="theDate" th:text="#{menu.appointment.c6}">time</label>
    <div class='input-group date' id='datetimepicker1'>
         <input type="text" class="form-control"  th:field="*{theDate}" id="theDate" isDate="true"  data_check="needInput()"></input>
         <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
    </div>    
    <span th:if="${#fields.hasErrors('theDate')}" th:errors="*{theDate}">telphone Error</span>
  </div>

  
  <div class="form-group">
    <label for="name" th:text="#{menu.appointment.c3}">idType</label>
    <select name="idType" class="form-control">
	  <option th:text="#{menu.appointment.c3.c1}">idType</option>
	</select>
  </div>
  
  <div class="form-group">
    <label for="idTypeNo" th:text="#{menu.appointment.c4}">idTypeNo</label>
    <input type="text" class="form-control" th:field="*{idTypeNo}"  id="idTypeNo" ></input>
  </div>  
  
  
  <div class="form-group">
    <label for="status" th:text="#{menu.appointment.c7}">status</label>
        
    <select name="status" th:field="*{status}" class="form-control">
      <option th:each="status : ${allStatus}" 
          th:value="${status}" 
          th:text="${status}">status</option>
	</select>
  </div>
  
  <div class="form-group">
    <label for="comment" >意见</label>
   	<textarea th:field="*{comment}" id="comment" name="comment" rows="3" class="form-control"></textarea>   
  </div>
  
   <div class="form-group">
  	<button type="submit" class="btn btn-default" th:text="#{form.confirm}">confirm</button> <span class="btn btn-default" onclick="history.go(-1)" th:text="#{form.cancel}">form.cancel</span>
  </div>
</form>
</div>
<script src="../../../../resources/js/check.js" th:src="@{/resources/js/check.js}"></script>
  <script src="../../../../resources/js/moment.min.js" th:src="@{/resources/js/moment.min.js}"></script>
  	<script src="../../../../resources/js/locales/bootstrap-datetimepicker.zh-CN.js" th:src="@{/resources/js/locales/bootstrap-datetimepicker.zh-CN.js}"></script>
    <script src="../../../../resources/js/bootstrap-datetimepicker.js" th:src="@{/resources/js/bootstrap-datetimepicker.js}"></script>
      <script type="text/javascript">
      $(function () {
          $('#datetimepicker1').datetimepicker({
        	  language: 'eo'
          });
      });
  </script>
</div>
</body>
</html>